import http from '@/utils/request';

/**
 * 获取学习进度
 * @returns {Promise}
 */
export const getStudyProgress = () => {
  return http.get('/study/progress');
};

/**
 * 获取学习记录
 * @param {Object} params 查询参数
 * @returns {Promise}
 */
export const getStudyRecords = (params = {}) => {
  return http.get('/study/records', params);
};

/**
 * 提交学习记录
 * @param {Object} recordData 记录数据
 * @returns {Promise}
 */
export const submitStudyRecord = (recordData) => {
  return http.post('/study/record', recordData);
};